]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
userMenu: Handle the case where the user has no icon file
authorAdel Gadllah <adel.gadllah@gmail.com>
Mon, 11 Feb 2013 16:16:44 +0000 (17:16 +0100)
committerAdel Gadllah <adel.gadllah@gmail.com>
Mon, 11 Feb 2013 18:39:00 +0000 (19:39 +0100)
Fix a crash in UserAvatarWidget.update that gets triggered when the user has
no icon file.

https://bugzilla.gnome.org/show_bug.cgi?id=693385

js/ui/userMenu.js

index 9bffe67d9d6adb1dc14cb03d075080832de2bfb9..1196c662de5003f740c28a42a3d361e402b190fc 100644 (file)
@@ -68,7 +68,7 @@ const UserAvatarWidget = new Lang.Class({
 
     update: function() {
         let iconFile = this._user.get_icon_file();
-        if (!GLib.file_test(iconFile, GLib.FileTest.EXISTS))
+        if (iconFile && !GLib.file_test(iconFile, GLib.FileTest.EXISTS))
             iconFile = null;
 
         if (iconFile) {